/*
 * @Description:
 * @Version: 1.0
 * @Autor: ziwei
 * @Date: 2021-04-25 14:00:52
 * @LastEditors: ziwei
 * @LastEditTime: 2021-04-25 14:01:07
 */
function fn(obj) {
  let str = '';
  with (obj) {
    str += `<!DOCTYPE html>
  <html lang="en">
  <head>
      <meta charset="UTF-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Document</title>
  </head>
  <body>
      `;
    arr.forEach((item) => {
      str += `
          <li>${item}</li>
      `;
    });
    str += `
  </body>
  </html>`;
  }
  return str;
}
console.log(fn({ arr: [1, 2, 3] }));
